<?xml version="1.0" encoding="UTF-8"?>
<!--
    Document   : InterfaceGenerator
    Created on : 08-Jul-2009, 13:35:22
    Author     : newtonr6
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <html id="outputHtml1">
            <head id="outputHead1">
                <ice:outputStyle href="/resources/xp-portlet.css" id="outputStyle1"/>

            </head>
            <body id="outputBody1" style="-rave-layout: grid">
                <ice:portlet>
                    <ice:form id="form1">
                        <ice:panelGrid cellpadding="4" style="margin-left:auto; margin-right:auto;">
                            <ice:panelGrid columns="2">
                                <ice:outputText id="outputText1" style="font-weight:bold; font-size:16px; color:#191970; margin-left:auto; margin-right:auto;"
                                                value="#{workflowBean.workflow}"/>
                                <ice:commandButton image="/resources/icons/png/16x16/Modify.png" title="Edit workflow name" action="#{InterfaceGenerator.editName}" visible="#{InterfaceGenerator.editNameVis}" />
                                <ice:inputText size="25" rendered="#{!InterfaceGenerator.editNameVis and InterfaceGenerator.editName1Vis}" binding="#{InterfaceGenerator.nameTextarea}"/>
                                <ice:commandButton value="OK" rendered="#{!InterfaceGenerator.editNameVis and InterfaceGenerator.editName1Vis}" action="#{InterfaceGenerator.confirmEditName}" />
                            </ice:panelGrid>
                            <br/>
                            <ice:commandLink value="Create / edit description" rendered="#{InterfaceGenerator.compsVis}" action="#{InterfaceGenerator.toggleDesc}"/>
                            <ice:inputRichText toolbar="Basic" skin="silver" valueChangeListener="#{InterfaceGenerator.saveDescription}" value="#{workflowBean.desc}" rendered="#{InterfaceGenerator.descVis}" />
                            <ice:outputText value="#{InterfaceGenerator.savedMessage}" style="#{InterfaceGenerator.savedMessageStyle}" rendered="#{InterfaceGenerator.descVis}" />
                            <br/>
                            <ice:dataTable binding="#{InterfaceGenerator.inputsTable}" columnWidths="25px, 150px, 25px" id="inputsTable"
                                           rendered="#{InterfaceGenerator.compsVis}" var="item" style="margin-left:auto; margin-right:auto;">
                                <ice:column style="text-align:center">
                                    <ice:graphicImage value="#{item.icon}"
                                                      title="#{item.message}"/>
                                </ice:column>
                                <ice:column>
                                    <f:facet name="header">
                                        <ice:outputText value="Input Name" style="font-weight:bold"/>
                                    </f:facet>
                                    <ice:outputText id="outputText2"
                                                    style="color:#191970; font-size:12px; font-weight:bold; text-align:center" value="#{item.name}"/>

                                </ice:column>
                                <ice:column style="text-align:center">
                                    <ice:commandButton action="#{InterfaceGenerator.addComponent}" image="/resources/icons/png/16x16/Create.png"
                                                       title="Add interface component"/>
                                </ice:column>
                            </ice:dataTable>
                            <br/>
                            <ice:panelGrid style="margin-left:auto; margin-right:auto;">
                                <ice:commandButton value="Confirm" style="margin-left:auto; margin-right:auto;" image="/resources/icons/png/Save.png"
                                                   rendered="#{InterfaceGenerator.confirmVis}" title="Save workflow interface" action="#{InterfaceGenerator.writeXML}" />
                            </ice:panelGrid>
                            <ice:panelGrid style="margin-left:auto; margin-right:auto;">
                                <ice:outputText binding="#{InterfaceGenerator.submitStatusText}" style="font-weight:bold; font-size:12px; color:green; margin-left:auto; margin-right:auto;" />
                            </ice:panelGrid>

                            <ice:panelGrid style="margin-left:auto; margin-right:auto;">
                                <ice:graphicImage id="wfImage" value="#{workflowBean.thumb}" style="margin-left:auto; margin-right:auto;" />
                            </ice:panelGrid>
                            <br/>
                            <ice:panelGrid columns="3">
                                <ice:graphicImage value="/resources/icons/png/16x16/Info.png" />
                                <ice:outputText value="  "/>
                                <ice:outputText id="peopleList" value=" This portlet allows you to define an interface component for each input of a workflow. You must remember to save the interface definition."
                                                style="font-style:italic; font-size:12px; color:#666666"/>
                            </ice:panelGrid>
                        </ice:panelGrid>
                        <ice:panelPopup id="modalPnlPop"
                                        draggable="false" modal="true" autoCentre="true"
                                        rendered="#{InterfaceGenerator.popupVis}">
                            <f:facet name="header">
                                <ice:panelGroup>
                                    <ice:outputText
                                        value="#{InterfaceGenerator.selectedInput}"/>
                                </ice:panelGroup>
                            </f:facet>
                            <f:facet name="body">
                                <ice:panelGroup styleClass="icePnlPopBody">
                                    <ice:panelGrid columns="3" >
                                        <ice:outputLabel for="compType" value="UI Component" style="font-weight:bold"/>
                                        <ice:selectOneMenu binding="#{InterfaceGenerator.uicMenu}" partialSubmit="true"
                                                           valueChangeListener="#{InterfaceGenerator.componentChanged}" styleClass="error" id="compType">
                                            <f:selectItem itemLabel="Text Box" itemValue="inputtext" />
                                            <f:selectItem itemLabel="Text Area" itemValue="textarea" />
                                            <f:selectItem itemLabel="Dropdown Menu" itemValue="dropdown" />
                                            <f:selectItem itemLabel="Checkboxes" itemValue="checkbox" />
                                            <f:selectItem itemLabel="Radio Buttons" itemValue="radio" />
                                            <f:selectItem itemLabel="File" itemValue="file" />
                                        </ice:selectOneMenu>
                                        <br/>

                                        <ice:outputLabel for="listValue" rendered="#{InterfaceGenerator.listInputVis}" value="List option" style="font-weight:bold"/>
                                        <ice:inputText binding="#{InterfaceGenerator.optionInputText}" rendered="#{InterfaceGenerator.listInputVis}" id="listValue"/>
                                        <ice:commandButton action="#{InterfaceGenerator.addOption}" rendered="#{InterfaceGenerator.listInputVis}" value="Add" />

                                        <br/>
                                        <ice:outputText value="#{InterfaceGenerator.addedOption}" />
                                        <br/>

                                        <ice:outputLabel for="typeList" value="Data Type" style="font-weight:bold"/>
                                        <ice:selectOneMenu binding="#{InterfaceGenerator.dataTypesMenuMenu}" id="typeList">
                                            <f:selectItem itemLabel="String" itemValue="string" />
                                            <f:selectItem itemLabel="Protein ID" itemValue="proteinid" />
                                            <f:selectItem itemLabel="Gene ID" itemValue="geneid" />
                                            <f:selectItem itemLabel="BLAST Sequence" itemValue="blastseq" />
                                        </ice:selectOneMenu>
                                        <br/>

                                        <br/><br/><br/>

                                        <ice:outputLabel for="description" value="Description" style="font-weight:bold" />
                                        <ice:inputTextarea id="description" onfocus="this.value=''" binding="#{InterfaceGenerator.descriptionTextarea}" />
                                        <br/>

                                        <br/><br/><br/>

                                        <ice:outputLabel for="example" value="Example" style="font-weight:bold" />
                                        <ice:inputTextarea id="example" onfocus="this.value=''" binding="#{InterfaceGenerator.exampleTextarea}" />
                                        <br/>

                                        <br/><br/><br/>

                                        <ice:outputLabel for="restriction" value="Add restrictions" style="font-weight:bold;" />
                                        <ice:selectBooleanCheckbox id="restriction" partialSubmit="true"
                                                                   valueChangeListener="#{InterfaceGenerator.restrictionChanged}"/>
                                        <br/>

                                        <ice:outputLabel for="type" value="Type" style="font-weight:bold;" visible="#{InterfaceGenerator.restrictVis}"/>
                                        <ice:selectOneRadio partialSubmit="true" visible="#{InterfaceGenerator.restrictVis}" binding="#{InterfaceGenerator.typeRadio}"
                                                            valueChangeListener="#{InterfaceGenerator.typeChanged}" value="String"  >
                                            <f:selectItem itemLabel="String" itemValue="String" />
                                            <f:selectItem itemLabel="Integer" itemValue="Integer" />
                                        </ice:selectOneRadio>
                                        <ice:outputText/>

                                        <ice:outputLabel for="min" value="Min value" visible="#{InterfaceGenerator.restrictVis and !InterfaceGenerator.stringVis}" />
                                        <ice:inputText id="min" binding="#{InterfaceGenerator.minInputText}" visible="#{InterfaceGenerator.restrictVis and !InterfaceGenerator.stringVis}"/>
                                        <ice:outputText visible="#{InterfaceGenerator.restrictVis and !InterfaceGenerator.stringVis}"/>

                                        <ice:outputLabel for="max" value="Max value" visible="#{InterfaceGenerator.restrictVis and !InterfaceGenerator.stringVis}" />
                                        <ice:inputText id="max" binding="#{InterfaceGenerator.maxInputText}" visible="#{InterfaceGenerator.restrictVis and !InterfaceGenerator.stringVis}" />
                                        <ice:outputText visible="#{InterfaceGenerator.restrictVis and !InterfaceGenerator.stringVis}"/>

                                        <ice:outputLabel for="length" value="Max length" visible="#{InterfaceGenerator.restrictVis and InterfaceGenerator.stringVis}"/>
                                        <ice:inputText id="length" binding="#{InterfaceGenerator.lengthInputText}" visible="#{InterfaceGenerator.restrictVis and InterfaceGenerator.stringVis}" />
                                        <ice:outputText visible="#{InterfaceGenerator.restrictVis and InterfaceGenerator.stringVis}"/>
                                    </ice:panelGrid>
                                    <hr/>
                                    <ice:commandButton value="OK" action="#{InterfaceGenerator.confirmAddComponent}"/>
                                    <ice:outputText value="     " />
                                    <ice:commandButton value="Cancel" action="#{InterfaceGenerator.cancelAddComponent}"/>

                                </ice:panelGroup>
                            </f:facet>
                        </ice:panelPopup>
                    </ice:form>
                </ice:portlet>
            </body>
        </html>
    </f:view>
</jsp:root>
